package cn.bgs.service.impl;

import cn.bgs.config.DirectConfig;
import cn.bgs.config.DirectHdConfig;
import cn.bgs.mapper.FeedbackFormMapper;
import cn.bgs.mapper.ThematicActivitiesMapper;
import cn.bgs.pojo.FeedbackForm;
import cn.bgs.pojo.ThematicActivities;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * @program: town-digital
 * @description:
 * @author: Mr.Zhao
 * @create: 2022-08-11 19:22
 */
@Component
public class DircetReciveHdThematicActService {

    private static final Logger log = LoggerFactory.getLogger(DircetReciveHdThematicActService.class);

    @Autowired
    private ThematicActivitiesMapper thematicActivitiesMapper;

    @RabbitListener(queues = DirectHdConfig.DIRECT_QUEUE_NAME)
    public void recive(ThematicActivities msg){

        UpdateWrapper<ThematicActivities> updateWrapper = new UpdateWrapper<>();
        updateWrapper.eq("id",msg.getId()).set("them_act_state","已发布");
        thematicActivitiesMapper.update(null, updateWrapper);





    }
}
